import{ createRouter,createWebHashHistory} from"vue-router";
// import Home from '@/components/HelloWorld.vue' 
import{navData} from '@/untils/nav'

const routes = [
    {
        path: '/',
        name: 'home',
        component: ()=>import("@/components/Helloworld.vue")
    }
]

navData.forEach((item)=>{
    routes.push({
        path: item.path, 
        name: item.name,
        component:()=>import("@/"+item.component)
    })
})
const router=createRouter({
    history:createWebHashHistory(), 
    routes
})

export default router